<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ngrok - 开发者必备的快速内网穿透工具</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        h1, h2, h3, h4, h5, h6 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 600;
            color: #111;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
        }
        .card-hover {
            transition: all 0.3s ease;
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .feature-icon {
            background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .highlight-text {
            position: relative;
            display: inline-block;
        }
        .highlight-text:after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 8px;
            background: rgba(124, 58, 237, 0.2);
            z-index: -1;
            transition: all 0.3s ease;
        }
        .highlight-text:hover:after {
            height: 16px;
        }
    </style>
</head>
<body class="antialiased bg-gray-50">
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 md:py-32 px-4 md:px-0">
        <div class="container mx-auto max-w-6xl px-4">
            <div class="flex flex-col md:flex-row items-center gap-12">
                <div class="md:w-1/2">
                    <div class="inline-block px-3 py-1 bg-white bg-opacity-20 rounded-full mb-4 text-sm font-medium">开发者工具</div>
                    <h1 class="text-4xl md:text-5xl font-bold leading-tight mb-6">ngrok - <span class="text-indigo-200">内网穿透的终极解决方案</span></h1>
                    <p class="text-lg md:text-xl text-indigo-100 mb-8">通过安全的反向代理技术，将本地或内部网络的服务快速暴露到公网，让开发和测试变得前所未有的简单。</p>
                    <div class="flex flex-wrap gap-4">
                        <a href="https://ngrok.com/" class="bg-white text-indigo-600 hover:bg-gray-100 px-6 py-3 rounded-lg font-semibold transition duration-200 flex items-center">
                            <i class="fas fa-external-link-alt mr-2"></i> 访问官网
                        </a>
                        <a href="#getting-started" class="bg-indigo-800 hover:bg-indigo-700 bg-opacity-50 px-6 py-3 rounded-lg font-semibold transition duration-200 flex items-center">
                            <i class="fas fa-rocket mr-2"></i> 快速开始
                        </a>
                    </div>
                </div>
                <div class="md:w-1/2 mt-8 md:mt-0">
                    <div class="bg-white bg-opacity-10 p-6 rounded-2xl backdrop-blur-sm border border-white border-opacity-20">
                        <div class="bg-gray-900 rounded-lg overflow-hidden">
                            <div class="bg-gray-800 px-4 py-2 flex items-center">
                                <div class="flex space-x-2 mr-4">
                                    <span class="w-3 h-3 rounded-full bg-red-500"></span>
                                    <span class="w-3 h-3 rounded-full bg-yellow-500"></span>
                                    <span class="w-3 h-3 rounded-full bg-green-500"></span>
                                </div>
                                <p class="text-sm text-gray-300 font-mono">terminal</p>
                            </div>
                            <div class="p-4">
                                <p class="text-green-400 font-mono mb-2">$ ngrok http 3000</p>
                                <p class="text-gray-400 font-mono text-sm mb-2">ngrok by @inconshreveable</p>
                                <p class="text-gray-400 font-mono text-sm mb-4">Session Status &nbsp;&nbsp;&nbsp; online</p>
                                <p class="text-gray-400 font-mono text-sm mb-2">Account &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; YourName (Plan: Free)</p>
                                <p class="text-gray-400 font-mono text-sm mb-4">Forwarding &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; https://abc123.ngrok.io -> http://localhost:3000</p>
                                <p class="text-gray-300 font-mono text-sm">Web Interface &nbsp;&nbsp; http://127.0.0.1:4040</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Problem Solving Section -->
    <section class="py-16 px-4 md:px-0 bg-white">
        <div class="container mx-auto max-w-6xl px-4">
            <div class="text-center mb-16">
                <h2 class="text-3xl font-bold mb-4">它能解决<span class="highlight-text">什么问题</span>？</h2>
                <p class="text-lg text-gray-600 max-w-3xl mx-auto">开发者在本地开发或测试时常常面临的网络访问难题</p>
            </div>
            <div class="grid md:grid-cols-3 gap-8">
                <div class="bg-gray-50 p-8 rounded-xl card-hover">
                    <div class="w-12 h-12 bg-indigo-100 rounded-lg flex items-center justify-center mb-6">
                        <i class="fas fa-plug text-indigo-600 text-xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">本地服务外部访问</h3>
                    <p class="text-gray-600">本地服务无法直接被外部访问，调试Webhook或移动端应用时需要复杂配置。</p>
                </div>
                <div class="bg-gray-50 p-8 rounded-xl card-hover">
                    <div class="w-12 h-12 bg-indigo-100 rounded-lg flex items-center justify-center mb-6">
                        <i class="fas fa-network-wired text-indigo-600 text-xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">复杂网络配置</h3>
                    <p class="text-gray-600">传统网络设置涉及DNS、端口转发、VPN或防火墙规则，耗时且易出错。</p>
                </div>
                <div class="bg-gray-50 p-8 rounded-xl card-hover">
                    <div class="w-12 h-12 bg-indigo-100 rounded-lg flex items-center justify-center mb-6">
                        <i class="fas fa-server text-indigo-600 text-xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">IoT设备管理</h3>
                    <p class="text-gray-600">在客户网络或IoT设备中部署API，需处理复杂的网络环境和安全策略。</p>
                </div>
            </div>
        </div>
    </section>

    <!-- Core Features Section -->
    <section class="py-16 px-4 md:px-0 bg-gray-50">
        <div class="container mx-auto max-w-6xl px-4">
            <div class="text-center mb-16">
                <h2 class="text-3xl font-bold mb-4">核心<span class="highlight-text">功能</span>概述</h2>
                <p class="text-lg text-gray-600 max-w-3xl mx-auto">ngrok提供以下核心功能，简化开发和部署流程</p>
            </div>
            <div class="grid md:grid-cols-2 gap-8">
                <div class="bg-white p-8 rounded-xl shadow-sm card-hover">
                    <div class="flex items-start mb-6">
                        <div class="flex-shrink-0 mr-4">
                            <i class="fas fa-shield-alt feature-icon text-3xl"></i>
                        </div>
                        <div>
                            <h3 class="text-xl font-semibold mb-2">安全隧道</h3>
                            <p class="text-gray-600">通过一条命令(如`ngrok http 80`)将本地服务暴露为公网URL，支持HTTP、TCP和TLS协议，自动处理TLS证书。</p>
                        </div>
                    </div>
                </div>
                <div class="bg-white p-8 rounded-xl shadow-sm card-hover">
                    <div class="flex items-start mb-6">
                        <div class="flex-shrink-0 mr-4">
                            <i class="fas fa-chart-line feature-icon text-3xl"></i>
                        </div>
                        <div>
                            <h3 class="text-xl font-semibold mb-2">流量管理</h3>
                            <p class="text-gray-600">支持OAuth、IP限制、Webhook验证等策略，保护服务安全并优化流量分配。</p>
                        </div>
                    </div>
                </div>
                <div class="bg-white p-8 rounded-xl shadow-sm card-hover">
                    <div class="flex items-start mb-6">
                        <div class="flex-shrink-0 mr-4">
                            <i class="fas fa-eye feature-icon text-3xl"></i>
                        </div>
                        <div>
                            <h3 class="text-xl font-semibold mb-2">实时监控</h3>
                            <p class="text-gray-600">内置流量检查器，提供请求/响应的实时分析，帮助调试和优化。</p>
                        </div>
                    </div>
                </div>
                <div class="bg-white p-8 rounded-xl shadow-sm card-hover">
                    <div class="flex items-start mb-6">
                        <div class="flex-shrink-0 mr-4">
                            <i class="fas fa-balance-scale feature-icon text-3xl"></i>
                        </div>
                        <div>
                            <h3 class="text-xl font-semibold mb-2">负载均衡</h3>
                            <p class="text-gray-600">通过端点池实现动态负载均衡，支持蓝绿部署和故障转移。</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Use Cases Section -->
    <section class="py-16 px-4 md:px-0 bg-white">
        <div class="container mx-auto max-w-6xl px-4">
            <div class="text-center mb-16">
                <h2 class="text-3xl font-bold mb-4">典型<span class="highlight-text">使用场景</span></h2>
                <p class="text-lg text-gray-600 max-w-3xl mx-auto">ngrok适用于多种开发与测试场景</p>
            </div>
            <div class="grid md:grid-cols-3 gap-8">
                <div class="bg-gray-50 p-8 rounded-xl card-hover">
                    <div class="w-16 h-16 bg-indigo-100 rounded-full flex items-center justify-center mb-6 mx-auto">
                        <i class="fas fa-code-branch text-indigo-600 text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3 text-center">Webhook调试</h3>
                    <p class="text-gray-600 text-center">开发者在本地开发时，需测试来自Stripe或GitHub的Webhook。运行`ngrok http 3000`，即可获得一个公网URL，接收Webhook请求并实时查看流量。</p>
                </div>
                <div class="bg-gray-50 p-8 rounded-xl card-hover">
                    <div class="w-16 h-16 bg-indigo-100 rounded-full flex items-center justify-center mb-6 mx-auto">
                        <i class="fas fa-building text-indigo-600 text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3 text-center">客户网络API接入</h3>
                    <p class="text-gray-600 text-center">企业需要在客户的环境中访问内部API，ngrok的轻量代理无需客户开放防火墙或配置VPN即可实现安全连接。</p>
                </div>
                <div class="bg-gray-50 p-8 rounded-xl card-hover">
                    <div class="w-16 h-16 bg-indigo-100 rounded-full flex items-center justify-center mb-6 mx-auto">
                        <i class="fas fa-microchip text-indigo-600 text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3 text-center">IoT设备管理</h3>
                    <p class="text-gray-600 text-center">在边缘设备上运行ngrok代理，创建统一入口，远程管理设备API，无需自定义协议或复杂网络设置。</p>
                </div>
            </div>
        </div>
    </section>

    <!-- Advantages Section -->
    <section class="py-16 px-4 md:px-0 bg-gray-50">
        <div class="container mx-auto max-w-6xl px-4">
            <div class="text-center mb-16">
                <h2 class="text-3xl font-bold mb-4">优势与<span class="highlight-text">特色</span></h2>
                <p class="text-lg text-gray-600 max-w-3xl mx-auto">相比其他反向代理工具，ngrok的独特之处</p>
            </div>
            <div class="grid md:grid-cols-2 gap-8">
                <div class="bg-white p-8 rounded-xl shadow-sm">
                    <div class="flex items-start mb-6">
                        <div class="flex-shrink-0 mr-4">
                            <i class="fas fa-bolt feature-icon text-2xl"></i>
                        </div>
                        <div>
                            <h3 class="text-xl font-semibold mb-2">零配置体验</h3>
                            <p class="text-gray-600">无需管理DNS、IP或端口，单命令即可上线，极大地降低网络配置难度。</p>
                        </div>
                    </div>
                </div>
                <div class="bg-white p-8 rounded-xl shadow-sm">
                    <div class="flex items-start mb-6">
                        <div class="flex-shrink-0 mr-4">
                            <i class="fas fa-globe feature-icon text-2xl"></i>
                        </div>
                        <div>
                            <h3 class="text-xl font-semibold mb-2">全球分布式网络</h3>
                            <p class="text-gray-600">通过多个PoP(接入点)，确保低延迟和高可用性，适合全球用户访问。</p>
                        </div>
                    </div>
                </div>
                <div class="bg-white p-8 rounded-xl shadow-sm">
                    <div class="flex items-start mb-6">
                        <div class="flex-shrink-0 mr-4">
                            <i class="fas fa-code feature-icon text-2xl"></i>
                        </div>
                        <div>
                            <h3 class="text-xl font-semibold mb-2">开发者友好</h3>
                            <p class="text-gray-600">提供CLI、SDK和API，支持多种编程语言，易于集成到CI/CD或开发流程。</p>
                        </div>
                    </div>
                </div>
                <div class="bg-white p-8 rounded-xl shadow-sm">
                    <div class="flex items-start mb-6">
                        <div class="flex-shrink-0 mr-4">
                            <i class="fas fa-lock feature-icon text-2xl"></i>
                        </div>
                        <div>
                            <h3 class="text-xl font-semibold mb-2">安全性</h3>
                            <p class="text-gray-600">支持OAuth、SAML、Mutual TLS等多种认证方式，内置DDoS防护，适合生产环境。</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Pricing Section -->
    <section class="py-16 px-4 md:px-0 bg-white">
        <div class="container mx-auto max-w-6xl px-4">
            <div class="text-center mb-16">
                <h2 class="text-3xl font-bold mb-4">使用门槛与<span class="highlight-text">成本</span></h2>
                <p class="text-lg text-gray-600 max-w-3xl mx-auto">ngrok提供灵活的定价方案，满足不同需求</p>
            </div>
            <div class="grid md:grid-cols-3 gap-8 max-w-5xl mx-auto">
                <div class="bg-indigo-50 p-8 rounded-xl border border-indigo-100 card-hover">
                    <div class="text-center mb-6">
                        <h3 class="text-xl font-semibold mb-2">免费计划</h3>
                        <p class="text-3xl font-bold text-indigo-600 mb-1">¥0<span class="text-base font-normal text-gray-600">/月</span></p>
                        <p class="text-gray-600 text-sm">适合个人开发者测试</p>
                    </div>
                    <ul class="space-y-3">
                        <li class="flex items-start">
                            <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                            <span class="text-gray-700">1个活跃隧道</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                            <span class="text-gray-700">基本HTTP/TCP隧道</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                            <span class="text-gray-700">40连接/分钟限制</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-times text-gray-400 mt-1 mr-2"></i>
                            <span class="text-gray-500">无自定义域名</span>
                        </li>
                    </ul>
                </div>
                <div class="bg-white p-8 rounded-xl border border-gray-200 shadow-sm card-hover transform scale-105 relative">
                    <div class="absolute top-0 right-0 bg-indigo-600 text-white text-xs font-bold px-3 py-1 rounded-bl-lg rounded-tr-lg">最受欢迎</div>
                    <div class="text-center mb-6">
                        <h3 class="text-xl font-semibold mb-2">专业计划</h3>
                        <p class="text-3xl font-bold text-indigo-600 mb-1">¥108<span class="text-base font-normal text-gray-600">/月</span></p>
                        <p class="text-gray-600 text-sm">适合个人开发者和小团队</p>
                    </div>
                    <ul class="space-y-3">
                        <li class="flex items-start">
                            <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                            <span class="text-gray-700">3个活跃隧道</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                            <span class="text-gray-700">自定义域名</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                            <span class="text-gray-700">60连接/分钟限制</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                            <span class="text-gray-700">保留隧道地址</span>
                        </li>
                    </ul>
                </div>
                <div class="bg-white p-8 rounded-xl border border-gray-200 card-hover">
                    <div class="text-center mb-6">
                        <h3 class="text-xl font-semibold mb-2">企业计划</h3>
                        <p class="text-3xl font-bold text-indigo-600 mb-1">¥自定义</p>
                        <p class="text-gray-600 text-sm">适合企业和生产环境</p>
                    </div>
                    <ul class="space-y-3">
                        <li class="flex items-start">
                            <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                            <span class="text-gray-700">无限隧道</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                            <span class="text-gray-700">高级安全功能</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                            <span class="text-gray-700">私有部署选项</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                            <span class="text-gray-700">优先技术支持</span>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </section>

    <!-- Getting Started Section -->
    <section id="getting-started" class="py-16 px-4 md:px-0 bg-gray-50">
        <div class="container mx-auto max-w-6xl px-4">
            <div class="text-center mb-16">
                <h2 class="text-3xl font-bold mb-4">快速<span class="highlight-text">上手指南</span></h2>
                <p class="text-lg text-gray-600 max-w-3xl mx-auto">只需简单几步，即可开始使用ngrok</p>
            </div>
            <div class="bg-white rounded-xl overflow-hidden shadow-sm">
                <div class="grid md:grid-cols-2 divide-y md:divide-y-0 md:divide-x divide-gray-200">
                    <div class="p-8">
                        <h3 class="text-xl font-semibold mb-6 flex items-center">
                            <span class="w-8 h-8 bg-indigo-100 text-indigo-600 rounded-full flex items-center justify-center mr-3">1</span>
                            注册并下载
                        </h3>
                        <p class="text-gray-600 mb-6">访问ngrok官网，注册账号并下载适合你操作系统的ngrok代理(支持Windows、Linux、macOS)。</p>
                        <a href="https://ngrok.com/" class="inline-flex items-center text-indigo-600 font-medium hover:text-indigo-800 transition duration-200">
                            <i class="fas fa-external-link-alt mr-2"></i> 前往ngrok官网下载
                        </a>
                    </div>
                    <div class="p-8">
                        <h3 class="text-xl font-semibold mb-6 flex items-center">
                            <span class="w-8 h-8 bg-indigo-100 text-indigo-600 rounded-full flex items-center justify-center mr-3">2</span>
                            配置authtoken
                        </h3>
                        <p class="text-gray-600 mb-4">登录后在仪表板获取authtoken，运行以下命令：</p>
                        <div class="bg-gray-800 rounded-lg p-4 mb-4">
                            <code class="text-green-400 font-mono">ngrok config add-authtoken &lt;your-token&gt;</code>
                        </div>
                    </div>
                    <div class="p-8">
                        <h3 class="text-xl font-semibold mb-6 flex items-center">
                            <span class="w-8 h-8 bg-indigo-100 text-indigo-600 rounded-full flex items-center justify-center mr-3">3</span>
                            启动隧道
                        </h3>
                        <p class="text-gray-600 mb-4">假设本地服务运行在端口3000，运行：</p>
                        <div class="bg-gray-800 rounded-lg p-4 mb-4">
                            <code class="text-green-400 font-mono">ngrok http 3000</code>
                        </div>
                        <p class="text-gray-600">ngrok将返回一个公网URL(如`https://abc123.ngrok.io`)。</p>
                    </div>
                    <div class="p-8">
                        <h3 class="text-xl font-semibold mb-6 flex items-center">
                            <span class="w-8 h-8 bg-indigo-100 text-indigo-600 rounded-full flex items-center justify-center mr-3">4</span>
                            查看流量
                        </h3>
                        <p class="text-gray-600 mb-4">打开ngrok提供的Web界面(默认`http://localhost:4040`)，查看请求详情。</p>
                        <div class="bg-gray-800 rounded-lg p-4">
                            <code class="text-green-400 font-mono">http://127.0.0.1:4040</code>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Technology Diagram -->
    <section class="py-16 px-4 md:px-0 bg-white">
        <div class="container mx-auto max-w-6xl px-4">
            <div class="text-center mb-16">
                <h2 class="text-3xl font-bold mb-4">ngrok<span class="highlight-text">工作原理</span></h2>
                <p class="text-lg text-gray-600 max-w-3xl mx-auto">可视化展示ngrok如何连接本地服务与公网</p>
            </div>
            <div class="bg-gray-50 p-8 rounded-xl">
                <div class="mermaid">
                    graph LR
                    A[本地服务] -->|localhost:3000| B(ngrok客户端)
                    B -->|安全隧道| C[ngrok云服务器]
                    C --> D[(公网用户)]
                    style A fill:#E5E7EB,stroke:#4F46E5,stroke-width:2px
                    style B fill:#4F46E5,stroke:#4F46E5,stroke-width:2px,color:white
                    style C fill:#7C3AED,stroke:#7C3AED,stroke-width:2px,color:white
                    style D fill:#E5E7EB,stroke:#4F46E5,stroke-width:2px
                </div>
            </div>
        </div>
    </section>

    <!-- CTA Section -->
    <section class="py-20 px-4 md:px-0 hero-gradient">
        <div class="container mx-auto max-w-4xl px-4 text-center">
            <h2 class="text-3xl md:text-4xl font-bold text-white mb-6">准备好体验ngrok的强大功能了吗？</h2>
            <p class="text-xl text-indigo-100 mb-8">立即开始，让您的本地服务轻松接入全球网络。</p>
            <a href="https://ngrok.com/" class="inline-block bg-white text-indigo-600 hover:bg-gray-100 px-8 py-4 rounded-lg font-semibold transition duration-200 text-lg">
                <i class="fas fa-download mr-2"></i> 免费下载ngrok
            </a>
        </div>
    </section>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>